
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemConfigRequest struct {

	MenuName string `json:"menu_name" form:"menu_name"`

	Type string `json:"type" form:"type"`

	InputType string `json:"input_type" form:"input_type"`

	ConfigTabId string `json:"config_tab_id" form:"config_tab_id"`

	Parameter string `json:"parameter" form:"parameter"`

	UploadType string `json:"upload_type" form:"upload_type"`

	Required string `json:"required" form:"required"`

	Width string `json:"width" form:"width"`

	High string `json:"high" form:"high"`

	Value string `json:"value" form:"value"`

	Info string `json:"info" form:"info"`

	Desc string `json:"desc" form:"desc"`

	Sort string `json:"sort" form:"sort"`

	Status string `json:"status" form:"status"`

	Level string `json:"level" form:"level"`

	LinkId string `json:"link_id" form:"link_id"`

	LinkValue string `json:"link_value" form:"link_value"`

}

func (r *SystemConfigRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemConfigRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"menu_name": "required",

		"type": "required",

		"input_type": "required",

		"config_tab_id": "required",

		"parameter": "required",

		"upload_type": "required",

		"required": "required",

		"width": "required",

		"high": "required",

		"value": "required",

		"info": "required",

		"desc": "required",

		"sort": "required",

		"status": "required",

		"level": "required",

		"link_id": "required",

		"link_value": "required",

	}
}

func (r *SystemConfigRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemConfigRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemConfigRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
